package model;

import com.fasterxml.jackson.annotation.JsonIgnore;

/**
 * 功能描述
 *
 * @author wileda
 * @date 2023/04/08  11:17
 */
public class User {
    private Long id;
    private String username;
    @JsonIgnore//不让序列化
    private String password;
    //  如果这个属性是1，则表示当前用户是作者
    private  int isAuthor ;


    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }


    public int getIsAuthor() { 
        return isAuthor;
    }

    public void setIsAuthor(int isAuthor) {
        this.isAuthor = isAuthor;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", isAuthor='" + isAuthor + '\'' +
                '}';
    }
}
